home *** CD-ROM | disk | FTP | other *** search
- global gAddressList, cMList, cMSprite, cStageWidth, cSpinCast, cSpinSprite, cHoldRect
-
- on startMovie
- repeat with channel = 10 to 19
- puppetSprite(channel, 1)
- end repeat
- set the randomSeed to the ticks
- set gAddressList to ["http://www.macromedia.com/Brain", "http://www.macromedia.com/Industry", "http://www.macromedia.com/Tools", "http://www.macromedia.com/AYS", "http://www.macromedia.com/Gallery", "http://www.macromedia.com/Toys", "http://www.macromedia.com/Search", "http://www.macromedia.com/Industry/Macro"]
- set cMList to ["MrStrechUp", "MrStrechDown", "MrWalkAround", "MrRotater"]
- set cSpinSprite to 18
- set cSpinCast to the castNum of sprite cSpinSprite
- set cMSprite to 19
- set cHoldRect to the rect of sprite cMSprite
- set cStageWidth to the stageRight - the stageLeft
- startTimer()
- end
-
- on stopMovie
- repeat with channel = 10 to 19
- puppetSprite(channel, 0)
- end repeat
- end
-
- on goToNetPage destination
- alert("Going to " & destination)
- end
-
- on checkRoll
- if the timer > 600 then
- do("MrAutoRotate")
- end if
- if rollOver(10) then
- set whichOne to getAt(cMList, random(count(cMList)))
- do(whichOne)
- end if
- repeat with spriteCounter = 11 to 17
- set holdLoc to the loc of sprite spriteCounter
- repeat while rollOver(spriteCounter)
- if the mouseDown then
- set the loc of sprite spriteCounter to holdLoc
- updateStage()
- exit repeat
- end if
- set the loc of sprite spriteCounter to holdLoc + point(2, 0)
- updateStage()
- set the loc of sprite spriteCounter to holdLoc + point(2, 2)
- updateStage()
- set the loc of sprite spriteCounter to holdLoc + point(0, 2)
- updateStage()
- set the loc of sprite spriteCounter to holdLoc
- updateStage()
- end repeat
- set the loc of sprite spriteCounter to holdLoc
- updateStage()
- end repeat
- end
-
- on MrStrechUp
- set cHoldRect to the rect of sprite cMSprite
- set MLeft to getAt(cHoldRect, 1)
- set MTop to getAt(cHoldRect, 2)
- set MRight to getAt(cHoldRect, 3)
- set MBottom to getAt(cHoldRect, 4)
- set MDirection to #down
- puppetSound("UpNdown")
- repeat while rollOver(10)
- if the mouseDown then
- set MTop to getAt(cHoldRect, 2)
- spriteBox(cMSprite, MLeft, MTop, MRight, MBottom)
- puppetSound(0)
- updateStage()
- exit repeat
- end if
- if MDirection = #down then
- set MTop to MTop - 2
- if MTop = 0 then
- set MTop to MTop + 2
- set MDirection to #up
- end if
- else
- set MTop to MTop + 2
- if MTop > getAt(cHoldRect, 2) then
- set MTop to MTop - 2
- set MDirection to #down
- end if
- end if
- spriteBox(cMSprite, MLeft, MTop, MRight, MBottom)
- updateStage()
- end repeat
- set MTop to getAt(cHoldRect, 2)
- spriteBox(cMSprite, MLeft, MTop, MRight, MBottom)
- puppetSound(0)
- updateStage()
- startTimer()
- end
-
- on MrStrechDown
- set cHoldRect to the rect of sprite cMSprite
- set MLeft to getAt(cHoldRect, 1)
- set MTop to getAt(cHoldRect, 2)
- set MRight to getAt(cHoldRect, 3)
- set MBottom to getAt(cHoldRect, 4)
- set MDirection to #down
- puppetSound("Springy")
- repeat while rollOver(10)
- if the mouseDown then
- set MTop to getAt(cHoldRect, 2)
- spriteBox(cMSprite, MLeft, MTop, MRight, MBottom)
- puppetSound(0)
- updateStage()
- exit repeat
- end if
- if MDirection = #down then
- set MTop to MTop + 2
- if MTop > MBottom then
- set MTop to MTop - 2
- set MDirection to #up
- end if
- else
- set MTop to MTop - 2
- if MTop < getAt(cHoldRect, 2) then
- set MTop to MTop + 2
- set MDirection to #down
- end if
- end if
- spriteBox(cMSprite, MLeft, MTop, MRight, MBottom)
- updateStage()
- end repeat
- puppetSound(0)
- set MTop to getAt(cHoldRect, 2)
- spriteBox(cMSprite, MLeft, MTop, MRight, MBottom)
- updateStage()
- startTimer()
- end
-
- on MrWalkAround
- set cHoldRect to the rect of sprite cMSprite
- set holdWidth to the width of sprite cMSprite
- set holdHeight to the height of sprite cMSprite
- set stepDistance to 3
- set the foreColor of sprite 10 to 255
- set MLeft to getAt(cHoldRect, 1)
- set MTop to getAt(cHoldRect, 2)
- set MRight to getAt(cHoldRect, 3)
- set MBottom to getAt(cHoldRect, 4)
- repeat while rollOver(10)
- repeat with ii = 2 to 9
- puppetSound("Slide")
- repeat while MRight <= (holdWidth * ii)
- if not rollOver(10) then
- resetScene()
- exit repeat
- end if
- set MRight to MRight + stepDistance
- spriteBox(cMSprite, MLeft, MTop, MRight, MBottom)
- updateStage()
- end repeat
- repeat while MLeft < (holdWidth * (ii - 1))
- if not rollOver(10) then
- resetScene()
- exit repeat
- end if
- set MLeft to MLeft + stepDistance + 2
- spriteBox(cMSprite, MLeft, MTop, MRight, MBottom)
- updateStage()
- end repeat
- end repeat
- puppetSound("Slide")
- repeat while MTop >= (getAt(cHoldRect, 3) - holdHeight)
- if not rollOver(10) then
- resetScene()
- exit repeat
- end if
- set MTop to MTop - stepDistance
- spriteBox(cMSprite, MLeft, MTop, MRight, MBottom)
- updateStage()
- end repeat
- repeat while MBottom >= (getAt(cHoldRect, 2) - 1)
- if not rollOver(10) then
- resetScene()
- exit repeat
- end if
- set MBottom to MBottom - stepDistance - 2
- spriteBox(cMSprite, MLeft, MTop, MRight, MBottom)
- updateStage()
- end repeat
- puppetSound("Click Clack")
- repeat with ii = 8 down to 0
- repeat while MLeft >= (holdWidth * ii)
- if not rollOver(10) then
- resetScene()
- exit repeat
- end if
- set MLeft to MLeft - stepDistance
- spriteBox(cMSprite, MLeft, MTop, MRight, MBottom)
- updateStage()
- end repeat
- repeat while MRight >= (holdWidth * ii)
- if not rollOver(10) then
- resetScene()
- exit repeat
- end if
- set MRight to MRight - stepDistance
- spriteBox(cMSprite, MLeft, MTop, MRight, MBottom)
- updateStage()
- end repeat
- end repeat
- end repeat
- resetScene()
- end
-
- on resetScene
- puppetSound(0)
- set the foreColor of sprite 10 to 35
- spriteBox(cMSprite, getAt(cHoldRect, 1), getAt(cHoldRect, 2), getAt(cHoldRect, 3), getAt(cHoldRect, 4))
- updateStage()
- startTimer()
- end
-
- on MrRotater
- puppetSound("Pop")
- set holdCast to the castNum of sprite cMSprite
- set the castNum of sprite cMSprite to holdCast + 1
- updateStage()
- repeat while rollOver(10)
- repeat with x = 0 to 3
- set the castNum of sprite cMSprite to holdCast + x
- repeat with y = 1 to 50
- if not rollOver(10) then
- set the castNum of sprite cMSprite to holdCast
- puppetSound(0)
- updateStage()
- exit repeat
- end if
- if the mouseDown then
- set the castNum of sprite cMSprite to holdCast
- puppetSound(0)
- updateStage()
- exit repeat
- end if
- end repeat
- updateStage()
- end repeat
- end repeat
- puppetSound(0)
- set the castNum of sprite cMSprite to holdCast
- updateStage()
- startTimer()
- end
-
- on MrAutoRotate
- set holdCast to the castNum of sprite cMSprite
- set the castNum of sprite cMSprite to holdCast + 1
- updateStage()
- repeat with numOTimes = 1 to 3
- repeat with x = 0 to 3
- set the castNum of sprite cMSprite to holdCast + x
- repeat with y = 1 to 50
- if rollOver(10) then
- set the castNum of sprite cMSprite to holdCast
- updateStage()
- exit repeat
- end if
- if the mouseDown then
- set the castNum of sprite cMSprite to holdCast
- updateStage()
- exit repeat
- end if
- end repeat
- updateStage()
- end repeat
- end repeat
- set the castNum of sprite cMSprite to holdCast
- updateStage()
- startTimer()
- end
-
- on spinIt
- if the castNum of sprite cSpinSprite <> cSpinCast then
- exit
- else
- startTimer()
- puppetSound("drive up")
- set delayRepeats to 48
- repeat with i = 1 to 4
- set delayRepeats to delayRepeats / 2
- repeat with x = 1 to 3
- set the castNum of sprite cSpinSprite to cSpinCast + x
- updateStage()
- repeat with yy = 1 to delayRepeats
- end repeat
- end repeat
- end repeat
- puppetSound("drive play")
- set delayRepeats to 12
- repeat while the mouseDown
- repeat with x = 1 to 3
- set the castNum of sprite cSpinSprite to cSpinCast + x
- updateStage()
- repeat with y = 1 to delayRepeats
- end repeat
- end repeat
- end repeat
- end if
- end
-
- on slowItAndStopIt
- puppetSound("disk down")
- set delayRepeats to 2
- repeat with i = 1 to 4
- set delayRepeats to delayRepeats * 2
- repeat with x = 1 to 3
- set the castNum of sprite cSpinSprite to cSpinCast + x
- updateStage()
- repeat with yy = 1 to delayRepeats
- end repeat
- end repeat
- end repeat
- repeat while soundBusy(1)
- repeat with x = 1 to 3
- set the castNum of sprite cSpinSprite to cSpinCast + x
- updateStage()
- repeat with yy = 1 to delayRepeats
- end repeat
- end repeat
- end repeat
- puppetSound(0)
- set the castNum of sprite cSpinSprite to cSpinCast
- updateStage()
- startTimer()
- end
-